<?php
error_reporting(E_ERROR);
ini_set('date.timezone', 'Asia/Shanghai');
header("Content-type:text/html;charset=utf-8");
include_once './sqlhelp.php';
$sqlhelp = new \sqlhelp\sqlhelp();

$order_num = $_REQUEST['order_num'];
if($order_num){
    $sql = "select avatar from cmf_user WHERE user_login = '$order_num'";
    $rows = $sqlhelp->get_rows($sql);
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Index</title>
</head>
<body>
<form>
    <input type="text" name="order_num">
    <button type="submit">查询</button>
</form>
<?php if(!empty($rows)){ ?>
    <table border="1">
        <tr>
            
			 <th>购买号码</th>
        </tr>
        <?php foreach ($rows as $row){ ?>
      
            <tr>
               
				<td><?php echo $row['avatar'] ?></td>
            </tr>
        <?php } ?>
    </table>
<?php } ?>
<?php
	$get_name = $_GET["name"];
	echo $get_name;
?>
</body>
</html>
<script src="/static/hongbao/js/main.js"></script>
<script>
	var user_id = localStorage.getItem("id")
	alert(user_id)
</script>
